#include<map>
#include<iostream>
#include<string>
#include<numeric>
using namespace std;
int sum(int init, pair<string, int> p)
{
    return init + p.second;
}

int main()
{
    map<string, int> dic;
    dic["C++"] = 100;
    dic["Java"] = 200;
    dic["C#"] = 300;
    dic["Python"] = 3000;
    
    for(map<string, int>::iterator it = dic.begin(); it != dic.end(); ++it){
        cout << (*it).first << endl;
    }
    cout << accumulate(dic.begin(), dic.end(),0, sum) << endl;
}
